package com.rabbit.listener;

import com.rabbit.conf.RabbitMQConf;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author CKC
 * @date 2022/12/25 12:02
 */
@Component
public class RabbitListeners {

    @RabbitHandler
    @RabbitListener(queues = RabbitMQConf.deadQueue)
    public void after(String message) {
        System.out.println("消费长度：" + message.length());
    }
}
